<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://libs.baidu.com/jquery/1.8.2/jquery.min.js"></script>
<link rel="stylesheet" href="/css/index.css" />
<script src="/js/qrcode.min.js"></script>

<script type="text/javascript">

            function IsPC() {
                var userAgentInfo = navigator.userAgent.toLowerCase();
                var Agents = ["android", "iphone", "nokian9", "symbianos", "windows phone", "ipad", "ipod"];
                var flag = true;
                for (var v = 0; v < Agents.length; v++) {
                    if (userAgentInfo.indexOf(Agents[v]) > 0) {
                        flag = false;
                        break;
                    }
                }
                return flag;
            }
            if (IsPC()) {
        		window.location.href = "/404.html";
        	}
            var request = (function () {    
                var _url = location.search; //获取url中"?"符后的字串
                var theRequest = new Object();   
                if (_url.indexOf("?") != -1) {      
                    var str = _url.substr(1);      
                    strs = str.split("&");
                    for (var i = 0; i < strs.length; i++) {         
                        theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);      
                    }
                }
                return theRequest;
            })();
            (function () {
                var App = function (loadRes) {
                    self = this;
                    this.loadRes = loadRes;
                    this.loadingindex = 0;
                    this.gid = request.id ? request.id : 1;
                    this.rum = function () {

                    	 var windowh = $(window).height();
                         var xh=(windowh - $(".page").height())/2;
                         $(".content").css("padding",xh+'px 0px');
                         
                         $(".page").height(windowh);
                    };
                    this.loadresup = function () {
                        $(".loading span").html(Math.floor(self.loadingindex / self.loadRes.length * 100) + "%");
                        if (self.loadingindex >= self.loadRes.length) {
                            $("#loading").addClass("hide");
                            $("#main").removeClass("hide");
                            self.rum();
                        } else {
                            var img = new Image();
                            img.src = loadRes[self.loadingindex++];

                            if (img.complete) {
                                self.loadresup();
                            } else {
                                img.onload = self.loadresup;
                            }
                        }
                    }
                    function init() {
                    	 var img = new Image();
                         img.src ="/uploads/"+request.id+".jpg";
                    	$(".photo").html(img);
                    	
  
                        var loadingui = $("#loading");
                        $(loadingui).css("top", ($($(loadingui).parent()).height() - $(loadingui).height()) / 2);

                        $("img[src]").each(function () {
                            var ressrc = $(this).attr("src");
                            if (self.loadRes.indexOf(ressrc) < 0) {
                                self.loadRes.push(ressrc);
                            }
                        });
                        $(".loading span").html("0%");
                        self.loadresup();
                        
                        
						
                    }
                    init();
                }
                window.App = App;
                var viewport = document.querySelector("meta[name=viewport]");
                viewport.setAttribute("content", "target-densitydpi=" + 750 / window.screen.availWidth * window.devicePixelRatio * 160 + ",user-scalable=no,width=device-width,initial-scale=" + window.screen.availWidth / 750 + ",maximum-scale=" + 1.5);
                if (navigator.userAgent.match(/iPad/i) == "ipad" || navigator.userAgent.match(/iPhone/i) == "iPhone") {
                    document.ontouchmove = function (e) {
                        e.preventDefault();
                    };
                }

            })();
            var _loadRes = ["img/bg.jpg"];
            
            
        </script>


</head>
<body scroll="no">
	<div id="loading" class="loading tac">
		<ul class="spinner">
			<li class="bounce1"></li>
			<li class="bounce2"></li>
			<li class="bounce3"></li>
		</ul>
		<span>100%</span>
	</div>
	<div id="main" class="page hide">
		<div class="tac w100 logo">
			<img src="img/logo.png">
		</div>
		<div class="content content2">
			<div class="tac w100 txt">
				<span><img src="img/t_0.png"></span> <span class="xx"><img
					src="img/t_1.png"></span> <span><img src="img/t_2.png"></span>
			</div>
			<div class="photo"></div>
			<div class="tac w100">
			<img src="img/t_4.png">
			</div>
		</div>
		<div class="tac w100 logo">
			<img src="img/logo.png">
		</div>
	</div>
</body>
<script type="text/javascript">
        $(document).ready(function () {
            new App(_loadRes);
        });
    </script>


</html>
